<div class="al-modal-view">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" ng-click="cancel()">
            <span aria-hidden="true" class="glyphicon glyphicon-remove"></span>
            <span class="sr-only">Close</span>
        </button>
        <h4 class="modal-title ok-color">{{modalTitle}}</h4>
    </div>
    <div class="modal-body">
      <ng-form name="modalForm" class="form-horizontal form-validation" role="form">
        <div class="form-group">
          <h3 class="text-center">房间信息</h3>
        </div>
        <div class="form-group">
          <label class="col-sm-2 col-sm-offset-1 control-label">公寓</label>
          <div class="col-sm-3">
            <div class="form-control info-text">{{data.apartmentName}}</div>
          </div>
          <label class="col-sm-2 control-label">楼栋</label>
          <div class="col-sm-3">
            <div class="form-control info-text">{{data.buildingName}}</div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 col-sm-offset-1 control-label">房间号</label>
          <div class="col-sm-3">
            <div class="form-control info-text">{{data.houseNo}}</div>
          </div>
          <label class="col-sm-2 control-label">状态</label>
          <div class="col-sm-3">
            <div class="form-control info-text">{{data.statusName}}</div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 col-sm-offset-1 control-label">月租金</label>
          <div class="col-sm-3">
            <div class="form-control info-text">{{data.salePrice}}</div>
          </div>
          <label class="col-sm-2 control-label">押金</label>
          <div class="col-sm-3">
            <div class="form-control info-text">{{data.depositPrice}}</div>
          </div>
        </div>

       <!--分割线-->
        <div class="form-group bd-top">
          <h3 class="text-center">定金信息</h3>
        </div>
        <div class="form-group">
          <label class="col-sm-2 col-sm-offset-1 control-label">用户手机号<span class="attr-need">*</span></label>
          <div class="col-sm-3">
            <input type="text" class="form-control" required
                   ng-pattern="$root.phoneVd" ng-change="fetchUser()"
                   ng-model="earnest.phone" placeholder="填写手机号">
          </div>
          <label class="col-sm-2 control-label">用户姓名<span class="attr-need">*</span></label>
          <div class="col-sm-3">
            <input type="text" class="form-control" required
                   ng-model="earnest.name" placeholder="填写姓名">
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 col-sm-offset-1 control-label">定金金额<span class="attr-need">*</span></label>
          <div class="col-sm-3">
            <input type="number" class="form-control" ng-model="earnest.money" placeholder="填写金额">
          </div>
          <label class="col-sm-2 control-label">收款金额</label>
          <div class="col-sm-3">
            <div class="form-control info-text">{{earnest.money}}</div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 col-sm-offset-1 control-label">计划入住日期</label>
          <div class="col-sm-5">
            <select ng-model="earnest.planTime" class="form-control"
                    ng-options="option.value as option.name for option in planTimeList"></select>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 col-sm-offset-1 control-label">付款方式</label>
          <div class="col-sm-5">
            <nobr>
              <label class="ui-radio" ng-repeat="option in offPayTypeList">
                <input name="status" ng-value="option.value" type="radio" ng-model="earnest.payType">
                <span>{{option.name}}</span>
              </label>
            </nobr>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-2 col-sm-offset-1 control-label">收款备注<span class="attr-need">*</span></label>
          <div class="col-sm-5">
            <textarea cols="3" class="form-control" required ng-model="earnest.moneyDesc"></textarea>
          </div>
        </div>
      </ng-form>
    </div>
    <div class="modal-footer">
        <button class="btn btn-warning no-border" type="button" ng-click="cancel()">取消</button>
        <button class="btn btn-primary no-border" ng-disabled="modalForm.$invalid"
                ng-confirm-click="{{'确认用户通过'+(earnest.payType|constantTransfer:offPayTypeList)+'支付了定金'+earnest.money+'元？'}}"
                ng-click="confirm()">确认收款</button>
    </div>
</div>